//
//  LiveThemeTableViewCell.m
//  Bread-Live
//
//  Created by ios on 2017/3/15.
//  Copyright © 2017年 Chris. All rights reserved.
//

#import "LiveThemeTableViewCell.h"
#import "LiveTimeView.h"

@interface LiveThemeTableViewCell ()
@property(nonatomic,strong) UILabel      *dateLabel;
@property(nonatomic,strong) UILabel      *timeLabel;
@property(nonatomic,strong) LiveTimeView *timeView;
@property(nonatomic,strong) UILabel      *titleLab;
@property(nonatomic,strong) UIImageView  *rightImageView;
@property(nonatomic,strong) UILabel      *weekLabel;
@property(nonatomic,strong) UILabel      *numberLabel;



@end

@implementation LiveThemeTableViewCell


-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        
        [self configView];
    }
    return self;
}


-(void)configView{
    
    CGFloat viewW = self.frame.size.width;
   // CGFloat viewH = self.frame.size.height;
    
    _dateLabel     = [[UILabel alloc] initWithFrame:CGRectMake(10, 10, 50, 21)];
    _dateLabel.text  = @"3月15日";
    _dateLabel.textColor  = TEXT_COLOR;
    _dateLabel.font       = [UIFont wyNormalFot:14];
    
    [self.contentView addSubview:_dateLabel];
    
    _titleLab     =  [[UILabel alloc] initWithFrame:CGRectMake(70, 10, viewW-160, 21)];
    _titleLab.text    = @"谢谢谢谢谢谢谢谢谢谢谢谢谢谢";
    _titleLab.textColor  = WYCOLOR(86, 86, 86, 1.0);
    
    _titleLab.font       = [UIFont wyBlodFont:16];
    
    [self.contentView addSubview:_titleLab];
    
    _timeLabel    = [[UILabel alloc] initWithFrame:CGRectMake(10, 35, 50, 21)];
    _timeLabel.text    = @"15:00";
    _timeLabel.textColor  = TEXT_COLOR;
    _timeLabel.font       = [UIFont wyNormalFot:14];
    
    [self.contentView addSubview:_timeLabel];
    
    CGFloat width = [ToolsCustom setLabelText:@"8天前·直播·END" textFont:[UIFont wyNormalFot:13]];
    
    _timeView = [[LiveTimeView alloc] initWithFrame:CGRectMake(70, 35, width+25, 25)];
    
    [_timeView setliveTimeTitle:@"8天前·直播·END" liveStatus:YES];
    
    [self.contentView addSubview:_timeView];
    
    _weekLabel    = [[UILabel alloc] initWithFrame:CGRectMake(10, 70, 30, 21)];
    _weekLabel.text    = @"周四";
    _weekLabel.textAlignment = NSTextAlignmentCenter;
    _weekLabel.textColor  = TEXT_COLOR;
    _weekLabel.font       = [UIFont wyNormalFot:14];
    _weekLabel.backgroundColor  = WYCOLOR(191, 190, 191, 1.0);
    
    [self.contentView addSubview:_weekLabel];
    
    _numberLabel   = [[UILabel alloc] initWithFrame:CGRectMake(80, 70, 50, 21)];
    _numberLabel.text    = @"· 1001";
    _numberLabel.textColor  = TEXT_COLOR;
    _numberLabel.font       = [UIFont wyNormalFot:13];
    
    [self.contentView addSubview:_numberLabel];
    
    _rightImageView = [[UIImageView alloc] initWithFrame:CGRectMake(viewW-90, 10, 80, 80)];
    
    [_rightImageView sd_setImageWithURL:[NSURL URLWithString:@"http://images.mianbaolive.com/manage/895d4d9e-cb67-4c55-b4af-8ab29112fa2a.jpg"]];
    
    [self.contentView addSubview:_rightImageView];
    
}



- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}



@end
